#ifndef SERVER_H
#define SERVER_H

#include <QWidget>
#include <QUdpSocket>
#include <QFile>

#define TRAN_SIZE 1024;


//结构体定义，不知道有什么用
//发送数据包的结构体，包括表头以及数据内容
struct ImageFrameHead{
    int funCode;
    unsigned int uTransFrameHdrSize;
    unsigned int uTransFrameSize;
    unsigned int uDataFrameSize;
    unsigned int uDataFrameTotal;
    unsigned int uDataFrameCurr;
    unsigned int uDataInFrameOffset;
};

namespace Ui {
class server;
}

class server : public QWidget
{
    Q_OBJECT

public:
    explicit server(QWidget *parent = 0);
    ~server();

private slots:
    void on_pushButton_clicked();

private:
    Ui::server *ui;
    QUdpSocket *m_udpSocket;

    qint64 sendsize;
    QString fileName;
    qint64 fileSize;
    QFile file;
    qint64 size;



};

#endif // SERVER_H
